package cn.itsource.pethome.basic.util;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
//按属性添加对应的有参构造
@AllArgsConstructor
//添加无参构造
@NoArgsConstructor
public class Result {
    private Boolean success = true;
    private String msg;

    //后端向前端响应的数据

    public Result(Boolean success, String msg) {
        this.success = success;
        this.msg = msg;
    }

    private Object resultObj;

    public Result(String msg) {
        this.msg =msg;
    }

    public Result setResultObj(Object resultObj){
        this.resultObj = resultObj;
        return this;
    }


}
